package com.be.beadmin.project.entity;

import com.be.beadmin.common.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * @Description: 批次柜体/柜体
 * @author: Jiaming Zheng
 * @Date: Create in 15:36 2023/2/13
 * @Modified By:
 **/
@Entity
@Getter
@Setter
@Table(name="T_PM_BatchProduct")
public class BatchProduct extends BaseEntity {

    @Column(name = "SerialNo",columnDefinition = "VARCHAR(50) COMMENT '流水号' ")
    private String serialNo;


    @Column(name = "InfoId",columnDefinition = "VARCHAR(50) COMMENT '项目id' not null")
    private String infoId;

    @Column(name = "projectName",columnDefinition = "VARCHAR(50) COMMENT '项目名称' not null")
    private String projectName;


    @Column(name = "projectCode",columnDefinition = "VARCHAR(50) COMMENT '项目编码' not null")
    private String projectCode;
    @Column(name = "BatchPlanId",columnDefinition = "VARCHAR(50) COMMENT '批次计划id' not null")
    private String batchPlanId;

    @Column(name = "BatchPlanCode", columnDefinition = "VARCHAR(50) COMMENT '计划编码' ")
    private String batchPlanCode;

    @Column(name = "BatchDeliveryDate", columnDefinition = "datetime COMMENT '交货日期' ")
    private Date batchDeliveryDate;

    @Column(name = "ErpMo", columnDefinition = "string COMMENT 'erp工单号' ")
    private String erpMo;


    /**
     * 0 未下发
     * 1 设计中
     * 2 工单下发
     * 3 生产中
     * 4
     * 。。。
     * -1 暂停
     */
    @Column(
            name = "State",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '柜体状态' "
    )
    protected Integer state = 0;

    @Column(
            name = "IsStandard",
            nullable = false,
            columnDefinition = "decimal(1) default 1 COMMENT '标准柜体' "
    )
    protected Integer isStandard = 1;

    @Column(name = "StandardProductCode",columnDefinition = "VARCHAR(50) COMMENT '标准柜体编码' ")
    private String standardProductCode;

    @Column(name = "ProductType",columnDefinition = "VARCHAR(50) COMMENT '柜体类型' ")
    private String productType;


    @Column(name = "UnAllocatedQty",columnDefinition = "int COMMENT '待分配柜体数量' ")
    private Integer unAllocatedQty;

    @Column(name = "UnstandardName",columnDefinition = "VARCHAR(50) COMMENT '非标柜体名称' ")
    private String unstandardName;

    @Column(name = "ProductCode",columnDefinition = "VARCHAR(50) COMMENT '柜体编码' ")
    private String productCode;

    @Column(name = "DesighWhLevel",columnDefinition = "int COMMENT '设计等级' ")
    private int desighWhLevel;

    @Column(name = "PlanDesignWh",columnDefinition = "float COMMENT '计划设计工时' ")
    private float planDesignWh;

    @Column(name = "ActualDesignWh",columnDefinition = "float COMMENT '实际设计工时' ")
    private float actualDesignWh;

    @Column(name = "ManufactWhLevel",columnDefinition = "int COMMENT '生产等级' ")
    private int manufactWhLevel;

    @Column(name = "PlanManufactWh",columnDefinition = "float COMMENT '计划生产工时' ")
    private float planManufactWh;

    @Column(name = "ActualManufactWh",columnDefinition = "float COMMENT '实际生产工时' ")
    private float actualManufactWh;

    @Column(
            name = "IsBomUploaded",
            nullable = false,
            columnDefinition = "decimal(1) default 1 COMMENT '上传BOM' "
    )
    protected Integer isBomUploaded = 0;

    @Column(name = "BomId",columnDefinition = "VARCHAR(50) COMMENT 'BOMID' ")
    private String bomId;

    @Column(name = "BomTime",columnDefinition = "datetime COMMENT 'BOM上传时间' ")
    private Date bomTime;

    @Column(
            name = "IsDrawingUploaded",
            nullable = false,
            columnDefinition = "decimal(1) default 1 COMMENT '上传图纸' "
    )
    protected Integer isDrawingUploaded = 0;

    @Column(name = "DrawingId",columnDefinition = "VARCHAR(50) COMMENT '图纸ID' ")
    private String drawingId;

    @Column(name = "DrawingTime",columnDefinition = "datetime COMMENT '图纸上传时间' ")
    private Date drawingTime;

    @Column(
            name = "drawingIsChange",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT '图纸是否变更' "
    )
    private int drawingIsChange;

    @Column(
            name = "bomIsChange",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT 'bom是否变更' "
    )
    private int bomIsChange;
    @Column(
            name = "IsDesignBop",
            nullable = false,
            columnDefinition = "decimal(1) default 1 COMMENT '是否设计了工艺路径' "
    )
    protected Integer isDesignBop = 0;

    @Column(name = "BopCode",columnDefinition = "VARCHAR(50) COMMENT '工艺路径code' ")
    private String bopCode;

    @Column(name = "BopTime",columnDefinition = "datetime COMMENT '工艺路径设计时间' ")
    private Date bopTime;

    @Column(name = "FileId",columnDefinition = "VARCHAR(50) COMMENT '附件ID' ")
    private String fileId;

    @Column(
            name = "ReviewState",
            nullable = false,
            columnDefinition = "decimal(1) default 1 COMMENT '审核状态:0-初始化 待上传 1-待审核 2-审核通过 3-驳回  如有异常直接退回0状态' "
    )
    protected Integer reviewState = 0;

    @Column(name = "ReviewMemo",columnDefinition = "text  COMMENT '审核备注' ")
    private String reviewMemo;

    @Column(name = "ReviewEditor",columnDefinition = "VARCHAR(50) COMMENT '审核人员' ")
    private String reviewEditor;

    @Column(name = "ReviewTime",columnDefinition = "datetime COMMENT '审核时间' ")
    private Date reviewTime;

    @Column(name = "ReviewFileId",columnDefinition = "VARCHAR(50) COMMENT '审核附件ID' ")
    private String reviewFileId;

    @Column(
            name = "IsPoReleased",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT 'PO释放' "
    )
    protected Integer isPoReleased = 0;

    @Column(name = "PoId",columnDefinition = "VARCHAR(50) COMMENT 'POID' ")
    private String poId;

    @Column(name = "PoTime",columnDefinition = "datetime COMMENT 'PO释放时间' ")
    private Date poTime;

    @Column(
            name = "IsWoReleased",
            nullable = false,
            columnDefinition = "decimal(1) default 0 COMMENT 'WO释放' "
    )
    protected Integer isWoReleased = 0;

    @Column(name = "WoId",columnDefinition = "VARCHAR(50) COMMENT 'WOID' ")
    private String woId;

    @Column(name = "WoTime",columnDefinition = "datetime COMMENT 'WO释放时间' ")
    private Date woTime;

    @Column(name = "ProductDesc",columnDefinition = "VARCHAR(50) COMMENT '柜体描述' ")
    private String productDesc;

    //创建人
    @Column(name = "Engineer",columnDefinition = "VARCHAR(50) COMMENT '工程师' ")
    private String engineer;
    @Column(name = "ReviewEditorId",columnDefinition = "VARCHAR(50) COMMENT '审核人员id' ")
    private String reviewEditorId;
    @Column(name = "SubmitTime", columnDefinition = "datetime COMMENT '提交时间' ")
    private Date submitTime;

    @Column(name = "PlanDesignStartDate", columnDefinition = "datetime COMMENT '设计开始' ")
    private Date planDesignStartDate;

    @Column(name = "PlanDesignEndDate", columnDefinition = "datetime COMMENT '设计结束' ")
    private Date planDesignEndDate;

    @Column(name = "StagePlanStartTime", columnDefinition = "datetime COMMENT '分料开始时间' ")
    private Date stageDosingStartTime;

    @Column(name = "ActualKickoffStartDate", columnDefinition = "datetime COMMENT '实际开工时间' ")
    private Date actualKickoffStartDate;

    @Column(name = "IsStdWorkHourUploaded", columnDefinition = "decimal(1) default 0 COMMENT '标准工时提交状态：1-已提交 0-未提交'")
    private Integer isStdWorkHourUploaded = 0;

    @Column(name = "BopIsChange", columnDefinition = "decimal(1) default 0 COMMENT '工艺路径是否变更：0-未变更，使用的默认路径 1-已变更'")
    private Integer bopIsChange = 0;

    @Column(name = "IsWireDrawingUploaded", columnDefinition = "int default 0 COMMENT '箱柜接线表：大于0-已提交 其他-未提交'")
    private Integer isWireFileUploaded = 0;

    @Column(name = "IsElectDrawingUploaded", columnDefinition = "int default 0 COMMENT '电气原理图：大于0-已提交 其他-未提交'")
    private Integer isElectDrawingUploaded = 0;

    @Column(name = "isGuideBookUploaded", columnDefinition = "int default 0 COMMENT '指导书维护字段：大于0-已上传 其他-未上传'")
    private Integer isGuideBookUploaded = 0;

    @Column(name = "BatchCountInfo",columnDefinition = "VARCHAR(50) COMMENT '所属批次信息' ")
    private String batchCountInfo;
}
